package com.auction.service;

import com.auction.dto.OrderDTO;
import com.auction.dto.OrderPageQueryDTO;
import com.auction.dto.PaymentDTO;
import com.auction.pojo.PageResult;
import com.auction.vo.OrderStatisticsVO;
import com.auction.vo.OrderVO;
import com.github.pagehelper.PageInfo;
import java.util.Map;

public interface OrderService {
    /**
     * 创建订单
     * 
     * @param orderDTO
     * @param userId
     * @return
     */
    Long create(OrderDTO orderDTO, Long userId);

    /**
     * 获取订单详情
     * 
     * @param id
     * @return
     */
    OrderVO getById(Long id);

    /**
     * 取消订单
     * 
     * @param id
     * @param userId
     * @return
     */
    boolean cancel(Long id, Long userId);

    /**
     * 确认收货
     * 
     * @param id
     * @param userId
     * @return
     */
    boolean confirm(Long id, Long userId);

    /**
     * 发货
     * 
     * @param id
     * @param sellerId
     * @param trackingNumber
     * @return
     */
    boolean ship(Long id, Long sellerId, String trackingNumber);

    /**
     * 分页查询买家订单列表
     * 
     * @param pageNum
     * @param pageSize
     * @param userId
     * @param orderStatus
     * @return
     */
    PageInfo<OrderVO> pageBuyer(int pageNum, int pageSize, Long userId, Integer orderStatus);

    /**
     * 分页查询卖家订单列表
     * 
     * @param pageNum
     * @param pageSize
     * @param sellerId
     * @param orderStatus
     * @return
     */
    PageInfo<OrderVO> pageSeller(int pageNum, int pageSize, Long sellerId, Integer orderStatus);

    /**
     * 支付订单
     *
     * @param id 订单ID
     * @return 支付结果
     */
    boolean pay(Long id, Long userId);

    /**
     * 分页查询订单列表
     * @param orderPageQueryDTO
     * @return
     */
    PageResult page(OrderPageQueryDTO orderPageQueryDTO);
}